package com.kuang.demo.controller.wx;

import com.kuang.demo.bean.BaseRespVo;
import com.kuang.demo.bo.wx.CommentListBo;
import com.kuang.demo.service.wx.WxCommentService;
import com.kuang.demo.vo.wx.CommentListVo;
import com.kuang.demo.vo.wx.Count4CommentVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("wx/comment")
public class WxCommentController {

    @Autowired
    WxCommentService wxCommentService;
    @RequestMapping("list")
    public BaseRespVo list(CommentListBo commentListBo){
        CommentListVo commentListVo = wxCommentService.list(commentListBo);
        return BaseRespVo.ok(commentListVo);
    }

    @RequestMapping("count")
    public BaseRespVo count(Integer valueId,Byte type){
        Count4CommentVo count4CommentVo = wxCommentService.count(valueId,type);
        return BaseRespVo.ok(count4CommentVo);
    }
}
